package com.itheima.bos.quartz;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import com.itheima.bos.service.take_delivery.IPromotionService;

public class PromotionJob implements Job {
	
	//注入Service
	@Autowired
	private IPromotionService promotionService;

	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		System.out.println("过期执行");
		promotionService.updateStatus(new Date());
	}

}
